C-----------------------------------------------------------
C  This program demonstrates the use of a hand-coded 
C  random-number generator in a Language Systems FORTRAN
C  program.  It can be linked with any of the following
C  object files:
C
C  SANERandomNumbers.p.o (SANE's built-in random number
C  generator)
C
C  PasRandomNumbers.p.o (hand-coded in Pascal)
C
C  RandomNumbers.a.o (hand-coded in assembly language)
C
C                          Jon Bell
C             Dept. of Physics & Computer Science
C                    Presbyterian College
C                      Clinton SC 29325
C                   CompuServe: #70441,353
C                         October 1991
C-----------------------------------------------------------
!!M Inlines.f
      IMPLICIT NONE
      INTEGER K, STOPTIME, RANDOMSEED
      EXTENDED X, RANDOMREAL
      EXTERNAL RANDOMREAL, RANDOMSEED
      CALL INITRANDOMSEED (%VAL(1))
      PRINT *
      PRINT *, 'The first ten random numbers are:'
      PRINT *
      DO K = 1, 10
         PRINT '(1X, F20.18)', RANDOMREAL()
      END DO
      DO K = 11, 10000
         X = RANDOMREAL()
      END DO
      PRINT *
      PRINT *, 'After 10000 iterations,'
      PRINT *, 'the random seed is ', RANDOMSEED(), '.'
      PRINT *
      K = 0
      STOPTIME = TICKCOUNT() + 3600
      DO WHILE (TICKCOUNT .LE. STOPTIME)
         X = RANDOMREAL()
         K = K + 1
      END DO
      PRINT *, 'In one second, ', K/60, 
     &         ' random numbers were generated.'
      PRINT *
      END
